<template>
  <div class="wrapper">
  	<swiper ref="mySwiper" :options="swiperOptions">
    <swiper-slide v-for="item of swiperList" :key="item.id">
      <img class="swiper-img" :src="item.imgUrl"/>
    </swiper-slide>


    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
  </div>
</template>

<script>
export default {
  name: 'homeSwiper',
  props:{
    swiperList:Array
  },
  data(){
    return{
      swiperOptions:{
        pagination:'.swiper-pagination',
        loop:false  //图片是否可以循环
      }
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="stylus" scoped>

.swiper-img
  width:100%
</style>
